var NPGridTRClass="TR-NPGrid",NPGridStopSort=0;function n(){var e=new Date;return e.getHours()+":"+e.getMinutes()+":"+e.getSeconds()+"."+e.getMilliseconds()}ko.extenders.GrdModeSwitch=function(e,t){return e.subscribe((function(e){t.grid.SetMode(e.toString())})),e},$.widget("ui.resizable2",$.ui.resizable,{_destroy:function(){this._super()}}),function(e){ko.bindingHandlers.npresizable={init:function(t,i,o,r,n){e("th",t).resizable2({handles:"w",start:function(e,t){NPGridStopSort=1},resize:function(e,t){var i=t.element.attr("npIndex");i&&"1"==t.element.attr("colspan")&&n.$root.Cols()[i].Width(t.size.width),t.element.css({left:"auto",width:"auto"})},stop:function(t,i){i.element.css({left:"auto",width:"auto"});var o=e(e(this).closest(".np-grid-header")).next();o[0].scrollWidth-4<=o[0].clientWidth?o.css("overflow-x","hidden"):o.css("overflow-x","auto"),np.noNg((()=>setTimeout((function(){NPGridStopSort=0}),0)))}})}},ko.bindingHandlers.npdraggable={init:function(t,i,o,r,n){var a,l,d,s=null,p=n.$root.ColSeqs();e("th",t).draggable({cursor:"crosshair",start:function(t,i){var o=parseInt(e(this).attr("npIndex")),r=parseInt(e(this).attr("colspan"));s=o,a=o+r-1},stop:function(t,i){s=null,a=null,e(this).css({left:"auto",top:"auto"})}}),e("th",t).droppable({accept:function(){return null!==s},hoverClass:"ui-state-active",drop:function(t,i){var o=parseInt(e(this).attr("npIndex")),r=parseInt(e(this).attr("colspan"));l=o,d=o+r-1;var c=p[s],v=p[l],g=p[a],h=p[d];if(v>c){for(var u=0;ug&&p[u]<=h&&(p[u]-=g-c+1);for(u=s;u<=a;u++)p[u]+=h-g}else{for(u=0;u=v&&p[u]'),g={Printable:c,ColPrefix:"C",npform:self,DefaultNoRadif:!0,RowNodeName:"row",ColFirstNo:1,InXML:s,width:a,Radif:d.Radif,ColAttr:d,RadifWidth:d.RadifWidth,ShowRadifTitle:d.ShowRadifTitle,HiddenAllColsFirst:d.HiddenAllColsFirst,height:300,FullScreenable:"1",Responsive:0,HideFooter:!0,GridInReport:1,ActiveRowClass:null,NoRowColor1:1,NoRowColor2:1,NoRowColor3:1,OddRowClass:null,EvenRowClass:null,NewDesign:1};v.append(l),g.ColAttr=g.ColAttr||{},d=g.ColAttr;var h=[];e("col",v).each((function(t,i){var o=t+1,r=e(i);h[t]={Data:r.attr("Dat"),Hide:r.attr("Hide"),Name:r.attr("Nam")},r.attr("COLTYPE")&&(d["COLTYPE"+o]=d["COLTYPE"+o]||r.attr("COLTYPE")),r.attr("SHOWTAG")&&(d["SHOWTAG"+o]=d["SHOWTAG"+o]||r.attr("SHOWTAG")),r.attr("DIR")&&(d["DIR"+o]=d["DIR"+o]||r.attr("DIR")),r.attr("ALIGN")&&(d["ALIGN"+o]=d["ALIGN"+o]||r.attr("ALIGN")),r.attr("MULTILINE")&&(d["MULTILINE"+o]=d["MULTILINE"+o]||r.attr("MULTILINE")),r.attr("SHOWLABEL")&&(d["SHOWLABEL"+o]=d["SHOWLABEL"+o]||r.attr("SHOWLABEL"))})),h&&(g.Cols=h),e(t).npgrid(g),ko.isObservable(p)&&p(e(t).npgrid("instance"))},update:function(e,t){}},ko.bindingHandlers.jqButton={init:function(t,i){e(t).addClass("btn btn-outline-secondary").css({"padding-top":"0px","padding-bottom":"0px","margin-bottom":"2px",height:"18px"})},update:function(t,i){i().enable?e(t).attr("disabled",!1):e(t).attr("disabled",!0)}},e.widget("np.npgrid",{options:{width:"auto",height:"auto",GridCover:null,RowHeight:null,RowMaxHeight:null,InXML:"",ColPrefix:"F",ColFirstNo:0,LinePerPage:20,Cols:[],_Cols:[],RId:null,RIdCol:null,RowNodeName:"N",ParVM:null,GridCursor:"",MinHeight:150,Radif:null,RadifWidth:30,ShowRadifTitle:!0,OddRowClass:"np-grid-odd",EvenRowClass:"np-grid-even",RowList:[10,20,30,40,50,100],ActiveRowClass:"npgrid-active-row",ActNo:null,ColAttr:{},ColDraggable:!1,Paging:!0,NoPaging:void 0,MaxRowId:null,NoRowColor1:!1,NoRowColor2:!1,NoRowColor3:!1,NoTdPadding:!1,NoShowHeader:!1,Printable:!1,MaximizeIcon:1,MinimizeIcon:0,npform:null,FullScreenable:0,NewDesign:0,Responsive:0,MaxRow:null,HideHeader:null,HideFooter:null,HideGrid:null,UpDat:null,Modes:null,ColHeight:null,GetRowDataInternal:null,GetRowData:null,AftSwitch:null,AftFilRowInternal:null,AftFilRow:null,InitOnRowClick:null,OnRowClick:null,InitAfterRowClick:null,AfterRowClick:null,OnGridTextBlur:null,AfterGridTextBlur:null,AfterGridDrawCompleted:null,ByDropDown:!0,FilterComboChangeVal:null,StopSort:0},NewRowData:null,widget:function(){return this.$Container},Container:function(){return this.$Container},_MakeGrid:function(){var t=this,i=t.options,o=t.element;if(o.hide(),o.before(t.$Container),"1"!=i.Responsive||i.Responsivable||(i.NoShowHeader=1,i.NoRowColor2=1),(i.Responsive||i.Responsivable)&&(t.ToolTip=e("
").appendTo(t.$Container)),!i.NoShowHeader){var r={width:"100%",overflow:"hidden",border:"0px"};i.GridInReport&&(r.position="sticky",r.top="0"),t.$Headerview=e('
').css(r).appendTo(t.$Container),t.UpDat=e('
').appendTo(t.$Headerview),"1"==i.NewDesign?t.$Header=e("
"):t.$Header=e("
"),t.$Header.css({height:"100%",overflow:"hidden"}).appendTo(t.$Headerview),t.ScrollDiv=e("
").css({float:"right",height:"10px"}).attr("data-bind","style:{'width':CalcScrollWidth()+'px'}"),t.$Header.append(e("
")).css("float","right"),e("div",t.$Header).attr("data-bind","style:{'width':(CalcWidth()+1)+'px'}")}i.HideGrid&&t.$Header.hide(),i.HideHeader&&(t.$Container.css("height","auto"),t.$Header.parent().hide()),i.NoShowHeader&&!i.Printable||e('
').appendTo(i.Printable?t.$Container:e("div",t.$Header)),i.Printable?e("").attr("data-bind","style:{'width':CalcWidth()+'px'}").attr("cellspacing",0).attr("cellpadding",0).addClass("npgrid-table-body").append(e('')).append("").appendTo(i.Printable?t.$Container:e("div",t.$GridBody)):(t.$GridBody=e('
').css({"overflow-y":"auto","overflow-x":i.NewDesign&&i.GridInReport?"hidden":"auto","min-height":"100px"}),i.HideGrid&&t.$GridBody.hide(),t.$GridBody.append(e("
")),t.$TBody=e("div",t.$GridBody),t.$GridBody.appendTo(t.$Container)),t.$Footerview=e('
').css({width:"100%",overflow:"hidden"}).appendTo(t.$Container),(i.HideGrid||i.HideFooter)&&t.$Footerview.hide();var n=e('
');t.$Footer=e("
").css({width:"100%","overflow-x":"auto","overflow-y":"hidden"}).addClass("np-grid-header").appendTo(t.$Footerview).append(n),i.FullScreenable&&(e("").attr("data-bind",'visible:MaximizeIcon(),jqButton:{enable: MaximizeIcon(),op:{icons:{primary:"ui-icon-seek-first"},text:false}},click:FullScreenClickFunc').append('').appendTo(e("div:eq(0)",n)),e("").attr("data-bind",'visible:MinimizeIcon(),jqButton:{enable: MinimizeIcon(),op:{icons:{primary:"ui-icon-seek-first"},text:false}},click:CloseFullScreenClickFunc').append('').appendTo(e("div:eq(0)",n))),t.$Toolbar[0]=e("").attr("data-bind",'visible:Paging,jqButton:{enable: currpage() > 1,op:{icons:{primary:"ui-icon-seek-end"},text:false}},click:gofirst').append('').appendTo(e("div:eq(0)",n)),t.$Toolbar[1]=e("").attr("data-bind",'visible:Paging,jqButton:{enable: currpage() > 1,op:{icons:{primary:"ui-icon-seek-next"},text:false}},click:goprev').append('').appendTo(e("div:eq(1)",n)),e('').text("صفحه").appendTo(e("div:eq(2)",n)),e('').css("paddig","0px").appendTo(e("div:eq(2)",n)),e('').text("از").appendTo(e("div:eq(2)",n)),e("tr>td:eq(2)",n).wrapInner(e("")),e('').appendTo(e("div:eq(2)",n)),t.$Toolbar[2]=e("").attr("data-bind",'visible:Paging,jqButton:{enable: currpage() < pagecount(),op:{icons:{primary:"ui-icon-seek-prev"},text:false}},click:gonext').append('').appendTo(e("div:eq(3)",n)),t.$Toolbar[3]=e("").attr("data-bind",'visible:Paging,jqButton:{enable: currpage() < pagecount(),op:{icons:{primary:"ui-icon-seek-first"},text:false}},click:golast').append('').appendTo(e("div:eq(4)",n)),e('').css("paddig","0px").appendTo(e("div:eq(6)",n)),e("").css("margin-right","5px").attr("data-bind",'visible:ShowMaxRow(),jqButton:{enable: true,op:{icons:{primary:"ui-icon-refresh"},text:false}},click:RefreshMaxRow').append('').appendTo(e("div:eq(6)",n)),n=null,t._on(t.$Container,{"mouseenter td.npgrid-body-cell":function(t){if(!i.GridInReport){var o=e(t.currentTarget);if(o.attr("title")||o.attr("lastnptitle","*"),"*"==o.attr("lastnptitle"))if(o[0].offsetWidth>o[0].scrollWidth)o.removeAttr("title").removeAttr("data-original-title");else{var r=o.html().replace(/
|
/g,"\n");r=e(""+r+""),o[0].align&&"left"==o[0].align.toLowerCase()?o.attr("data-html","true").attr("data-toggle","tooltip").attr("data-original-title","
"+e(r).text()+"
").removeAttr("title"):o.attr("data-toggle","tooltip").attr("data-original-title",e(r).text()).removeAttr("title")}}},click:function(i){0==e(i.target).closest("div[isdivtoggle]").length&&e("div[isdivtoggle]",t.$Footerview).hide()}}),i.NoShowHeader||t.$GridBody.scroll((function(o){i.Responsive||t.$Header.scrollLeft(e(o.target).scrollLeft())})),e(t.$Footerview).on("click","div[TogglePages=1]",(function(){var t=e(this).parent(),i=e("div[IsDivToggle='1']",t),o=e(this).position().left-i.width(),r=e(this).position().top-i.height()-10+(e(this).closest(".ui-dialog").length>0?e(this).closest(".ui-dialog").scrollTop():0)+"px";return o=(o<0?e(this).position().left:o)+"px",e("div[IsDivToggle='1']",t).css({left:o,top:r}).toggle(),!1}))},ReCalcDim:function(t,i,o){var r=this;if(!r||!r._vm||!r._vm.CalcWidth)return;var n=r.options,a=r.$Container,l=n.GridCover;let d=!1;if(n?.npform?.W_?.$dvfrmCenter?.hasClass("np-d-none")&&(n?.npform?.W_?.$dvfrmCenter?.removeClass("np-d-none"),d=!0),l=l||e(window),r.$Container.is(":np-npUiDialog")&&r.$Container.npUiDialog("isOpen"))d&&n?.npform?.W_?.$dvfrmCenter?.addClass("np-d-none");else{if(t||(t=n.width),"auto"==t){var s=a.outerWidth(!0)-a.width(),p=l.width();0==p&&(p=l[0].clientWidth),(t=p-r._ScrollWidth-r._Right)>r._vm.CalcWidth()+s&&(t=r._vm.CalcWidth()+s)}n.HelpDialog&&(t+=r._ScrollWidth),n.Responsivable&&(t>500&&n.Responsive&&(n.Responsive=0,r._vm.Responsive(n.Responsive),r.RebuildGrid()),t<=500&&!n.Responsive&&(n.Responsive=1,r._vm.Responsive(n.Responsive),r.RebuildGrid())),r.$Container.parent().width()-4>t+r._ScrollWidth?r._vm.GridWidth(t+r._ScrollWidth):r._vm.GridWidth(t),n.HelpDialog&&r.$GridBody[0].scrollWidth-4<=r.$GridBody[0].clientWidth&&r.$GridBody.css("overflow-x","hidden"),r._vm.GridHeight(i);var c=a.parent();if(c&&c.width()t&&((!(t=v)||t<1)&&(t=400),r._vm.GridWidth(t))}d&&n?.npform?.W_?.$dvfrmCenter?.addClass("np-d-none"),r.FixHeader(),np.noNg((()=>setTimeout((function(){r.FixFooter()}),100)))}},FixFooter:function(){var t=this;t.options;if(t.$Footerview){t.$Footerview.find(e("div[IsDivToggle='1']")).hide(),1==e("div[TogglePages=1]:visible",t.$Footerview).length&&t.$Footerview.find(e("div[IsDivToggle='1']")).find("div[role='group']:hidden").each((function(i,o){e("div[TogglePages=1]:visible",t.$Footerview).before(e(o).css("display","inline"))}));t.$Footerview.height();var i=e("div[IsDivToggle=1]",t.$Footerview).parent(),o=e("div[IsDivToggle='1']",i);0==e("div",o).length&&e("div[role='group']:hidden",i).each((function(t,o){e("div[IsDivToggle='1']",i).append(e(o).css("display","block").show())}))}},FixHeader:function(){var e=this,t=e.options;t.NoShowHeader||t.Responsive||e._vm.TrOfTBody().length&&e.$Header.scrollLeft(e.$GridBody.scrollLeft())},CreateTBodyNPGridScript:function(){var t=this,i=t.options,o="",r="",n="",a=i.Responsive?"div":"tr",l=i.Responsive?"row grd-row":"";o="<"+a+" class='"+l+" "+NPGridTRClass+(i.NoTdPadding?" TR-NoTdPadding":"")+"' style='border:currentColor;font-weight:normal;"+(i.NoRowColor2||i.Responsive?"":"cursor: pointer;")+'\' data-bind="css: $root.RowClassName($data,$context) ,visible:DisplayTr ,style:{height:$root.GridRowHeight()} ,click:function($data,ev){return $parent.RowClick(ev,$data)} ,event: { mouseover: $parent.mov, mouseout: $parent.mou,focusout:function($data,ev){return $root.RowBlur(ev,$data)}} ,attr:{radifindex:RadifId} " >';var d=t._vm.TrOfTHead().length;e.each(t._vm.TrOfTHead(),(function(o,n){r+="\x3c!-- ko if:(Index=='"+n.Index+"') --\x3e"+String.fromCharCode(10),i.GridInReport?r+=""+String.fromCharCode(10):r+=""+String.fromCharCode(10),e.each(t._vm.ThTdNoHide(n,"Th"),(function(e,t){if(void 0!==t.CheckBox)r+='';else{var i=t.Html().replace(/'/g,"\\'").replace(/"/g,"\\'").replace(/\n/g,"");r+=""+String.fromCharCode(10)}})),r+="",r+="\x3c!-- /ko --\x3e"+String.fromCharCode(10)})),e.each(t._vm.ColsNoHide(),(function(r,a){var l=i.Responsive?"div":"td",d=i.Responsive?"height:"+i.ColHeight+"px;max-height:"+i.ColHeight+"px;t_ext-align: right;vertical-align:top !important;white-space:pre-wrap":a.CheckBox?"text-align: center":"vertical-align:top !important";i.GridInReport&&(d+=";position:inherit");var s=i.Responsive?"grd-col col-md-"+a.ColMdWidth+" col-"+a.ColXsWidth:"npgrid-body-cell np-border-left-right";n+='",o+=" <"+l+" data-container='body' np-col-name='"+a.Name+"' style='"+d+"' class='"+s+(void 0===a.Index?" npgrid-header alert-info":"")+(void 0===a.Dir||"ltr"!=a.Dir.toLowerCase()||i.GridInReport||"1"==a.NoLatin?"":" IsLatin")+(void 0!==a.MultiLine&&"1"==a.MultiLine?"":" nobr")+"' "+(!a.Dir||i.Responsive&&a.NoLatin?"":"dir='"+a.Dir+"' ")+(void 0!==a.CheckBox||void 0===a.Index?"align='center'":void 0!==a.Align?"align='"+a.Align+"' ":"");var p=a.Index&&i.Cols[a.Index]&&i.Cols[a.Index].Enable,c="";if(p){var v=t.GetColId(p);v>-1&&(c=",enable:$data.Td()["+v+"].Html()")}if(void 0!==a.ShowTag&&"4"==a.ShowTag){var g,h="";e.each(i.RelField,(function(e,t){t.col-1==a.Index&&(h=t.id)})),a.NexCol&&isNaN(a.NexCol)?(g=t.GetColId(a.NexCol))<0&&(g=""):g=a.NexCol-1;var u="1"==a.NexRow?1:0;o+=">"+String.fromCharCode(10)+"'+String.fromCharCode(10)}else if(void 0===a.CheckBox){var m="",C="",f="";void 0!==a.Index&&i.Responsive&&"1"==t._vm.Cols()[a.Index].ShowLabel&&(m="'"+np.GrdColCaptionElem1.replace(/'/g,"\\'")+t._vm.FullHeaderCaption[a.Index]+np.GrdColCaptionElem2+"'+"),"0"==a.ShowTag&&(C=i.Responsive?a.NoLatin?"''+":"1"==a.MultiLine?"''+":"''+":"''+",f="+''"),o+=' data-bind="'+(void 0!==a.Index?"GridUniHtml:"+m+C+"$data.Td()["+a.Index+"].Html()"+f:"")+(void 0===a.Index?"UniText:RadifId":"")+",ShowTagGrid:'"+(void 0!==a.ShowTag&&"1"!=a.ShowTag&&"3"!=a.ShowTag||void 0===a.Index?"":"1")+(void 0!==a.ShowTag&&"1"!==a.ShowTag&&"3"!==a.ShowTag&&void 0!==a.Index?"0":"")+"',event: { mouseover: $parent.mov2, mouseout:$parent.mou2}"+(a.HideIfEmpty&&a.HideIfEmpty()?",visible:$data.Td()["+a.Index+"].Html()":"")+'">'+String.fromCharCode(10)}else o+=">"+String.fromCharCode(10)+''+String.fromCharCode(10);o+=""+String.fromCharCode(10)}));a=i.Responsive?"div":"tr";o+="";var s="";s=i.Responsive?"
":"
'+String.fromCharCode(10)+""+String.fromCharCode(10)+(!t.FilterType||1!=d&&1!=n.Index&&2!=t.RowSpan?"":"TXT"==t.FilterType?"':'')+""+(t.Index||0==t.Index?'':"")+""+String.fromCharCode(10)+"
",t.TFullNPGridScript.text(s),t.TBodyNPGridScript.text(o),t.THeadNPGridScript.text(r),t.TColsNPGridScript.text(n)},RebuildGrid:function(){var e=this;e.CreateTBodyNPGridScript(),e._vm.TFullNPGridScript(e.TFullNPGridScriptName),e._vm.TBodyNPGridScript(e.TBodyNPGridScriptName),e._vm.THeadNPGridScript(e.THeadNPGridScriptName),e._vm.TColsNPGridScript(e.TColsNPGridScriptName)},_create:function(){var t=this,i=t.options,o=t.element;t.$Toolbar=[],"0"==i.Responsive&&(i.Responsive=0),"0"==i.Responsivable&&(i.Responsivable=0),t.$Container=e("
").attr("data-bind","style:{'width':Responsive()?null:(GridWidth()+'px')"+(i.Printable||i.HideGrid||i.HideHeader?"}":",'h_eight':GridHeight()+'px'}")).addClass("ui-npgrid bg-lig__ht").css("overflow",i.GridInReport?"":"hidden"),"1"==i.NewDesign&&t.$Container.css("max-width","100%"),t._Right=0,t._Top=0,t._ScrollWidth=0,i.LinePerPage=parseInt(i.LinePerPage,10);var r=o.attr("id");if(r)var n=i.npform.MakeOrgId(r);else r=o.uniqueId().attr("id");t._vm_subscriptions=[],i.NoPaging&&(i.Paging=!1),t._vm={GridId:r,OrgGridId:n,Responsive:ko.observable(i.Responsive),currpage:ko.observable(1),MaximizeIcon:ko.observable(i.MaximizeIcon),MinimizeIcon:ko.observable(i.MinimizeIcon),LinePerPage:ko.observable(i.LinePerPage),RowList:ko.observableArray(i.RowList),RowListSelected:ko.observableArray([parseInt(i.LinePerPage)]),pagecount:ko.observable(1),GridWidget:t,ShowMaxRow:ko.observable(!!i.MaxRow),MaxRow:ko.observable(i.MaxRow),UpDat:ko.observable(i.UpDat),_npform:i.npform},t.DontRunSetScaleInFirstTime=0;var a=[],l=[],d=0;t._HasFilter=!1,e("colgroup>col",e(o)).each((function(o,r){var n={},s=e(r).attr("width"),p=i.ColFirstNo+o;a[o]=o,s=s&&s.indexOf("px")>0?s.substr(0,s.indexOf("px")):s,n.Width=ko.observable(isNaN(s)?0:parseInt(s)),n.ColMdWidth=i.Cols[o]&&i.Cols[o].ColMdWidth||i.ColAttr["ColMdWidth"+p],n.ColXsWidth=i.Cols[o]&&i.Cols[o].ColXsWidth||i.ColAttr["ColXsWidth"+p],n.ColMdWidth>-1&&n.ColMdWidth<13||100==n.ColMdWidth||(n.ColMdWidth="12"),n.ColXsWidth>-1&&n.ColXsWidth<13||100==n.ColXsWidth||(n.ColXsWidth="12"),d+=n.Width();var c=i.HiddenAllColsFirst&&i.Cols[o]?1:i.Cols[o]&&i.Cols[o].Hide?i.Cols[o].Hide:0;i.Responsive&&!i.Responsivable||"1"!=i.ColAttr["Hide"+p]&&0!=s||(c=1),i.Responsive&&"1"==i.ColAttr["Hide"+p]&&(c=1);var v=i.Responsive&&"1"==i.ColAttr["HideIfEmpty"+p]?1:0;i.Cols[o]&&"1"==i.Cols[o].HideIfEmpty&&(v=1),n.Index=o,n.Hide=ko.observable(c),n.HideIfEmpty=ko.observable(v),n.OHtml=r.outerHTML,n.Name=i.Cols[o]&&i.Cols[o].Nam||i.ColAttr["NAME"+p]||i.ColPrefix+p,n.Data=i.Cols[o]?i.Cols[o].Dat||i.Cols[o].Data:p.toString(),n.NoLatin=i.Cols[o]&&i.Cols[o].NOLATIN||i.ColAttr["NOLATIN"+p],n.Dir=i.Cols[o]&&i.Cols[o].DIR||i.ColAttr["DIR"+p],n.Dir&&"ltr-farnum"==n.Dir.toLowerCase()&&(n.Dir="ltr",n.NoLatin="1"),n.Align=i.Cols[o]&&i.Cols[o].ALIGN||i.ColAttr["ALIGN"+p],n.NoLatin=i.GridInReport&&"right"==n.Align&&"ltr"==n.Dir?1:n.NoLatin,n.ColType=i.Cols[o]&&i.Cols[o].COLTYPE||i.ColAttr["COLTYPE"+p],n.MultiLine=i.Cols[o]&&i.Cols[o].MULTILINE||i.ColAttr["MULTILINE"+p],n.ShowTag=i.Cols[o]&&i.Cols[o].SHOWTAG||i.ColAttr["SHOWTAG"+p],n.CheckBox=i.Cols[o]&&i.Cols[o].CheckBox||i.ColAttr["CheckBox"+p],n.FilterType=i.Cols[o]&&i.Cols[o].FilterType||i.ColAttr["FilterType"+p],n.GridOutput=i.Cols[o]&&i.Cols[o].GridOutput||i.ColAttr["GridOutput"+p],n.ShowLabel=i.Cols[o]&&i.Cols[o].SHOWLABEL||i.ColAttr["SHOWLABEL"+p],n.NexCol=i.Cols[o]&&i.Cols[o].NexCol||i.ColAttr["NexCol"+p],n.NexRow=i.Cols[o]&&i.Cols[o].NexRow||i.ColAttr["NexRow"+p],n.CB=i.Cols[o]&&i.Cols[o].CB||i.ColAttr["CB"+p],n.NOY=i.Cols[o]&&i.Cols[o].NOY||i.ColAttr["NOY"+p],n.Typ=i.Cols[o]&&i.Cols[o].Typ||i.ColAttr["Typ"+p],n.CurLang=i.Cols[o]&&i.Cols[o].CurLang||i.ColAttr["CurLang"+p],n.Fro=i.Cols[o]&&i.Cols[o].Fro||i.ColAttr["Fro"+p],n.To=i.Cols[o]&&i.Cols[o].To||i.ColAttr["To"+p],n.Max=i.Cols[o]&&i.Cols[o].Max||i.ColAttr["Max"+p],n.Min=i.Cols[o]&&i.Cols[o].Min||i.ColAttr["Min"+p],n.Lan=i.Cols[o]&&i.Cols[o].Lan||i.ColAttr["Lan"+p],n.Fil=i.Cols[o]&&i.Cols[o].Fil||i.ColAttr["Fil"+p],n.Jus=i.Cols[o]&&i.Cols[o].Jus||i.ColAttr["Jus"+p],n.inputmode=i.Cols[o]&&i.Cols[o].inputmode||i.ColAttr["inputmode"+p],n.FilterType&&(t._HasFilter=!0),n.ColNo=o,n.FilterComboOptions=ko.observableArray([]),n.FilterComboHasNull=ko.observable(!1),n.FilterComboSelected=ko.observable(),n.FilterTextbox=ko.observable(),l.push(n),t._vm_subscriptions.push(n.FilterComboSelected.subscribe((function(){t._trigger("FilterComboChangeVal",null,{ColNo:o})})))})),t._vm.ColSeqs=ko.observableArray(a),t._vm.Sort=ko.observableArray([]),t._vm.Cols=ko.observableArray(l),t._vm.CalcFilterComboOptions=function(e){var i=t._vm.Cols()[e];return i.FilterComboHasNull()?[null].concat(i.FilterComboOptions()):i.FilterComboOptions()},t._vm.SetOptionsAfterRender=function(e,t){t||(e.style.fontStyle="italic")},t._vm.PauseApplyColsNoHide=ko.observable(!1),t._vm.Radif=ko.observable(i.Radif?i.Radif:0);var s=i.RadifWidth;try{s&&(i.RadifWidth=parseFloat(s))}catch(o){i.RadifWidth=30}t._vm.RadifCols=ko.observable({Width:ko.observable(i.RadifWidth?i.RadifWidth:30),Dir:i.ColAttr.DIRR,Align:i.ColAttr.ALIGNR,ColType:"NUMBER",Hide:t._vm.Radif()?0:1,Name:"Radif",Data:"R",Html:i.ShowRadifTitle?"ردیف":""}),d>10&&d<400&&void 0===i.NoPaging&&(i.NoPaging=!0,i.Paging=!1),t._vm.Paging=ko.observable(i.Paging),d+=t._vm.Radif()?t._vm.RadifCols().Width()+2:0,i.width>d&&(i.width=d);for(var p=[],c=[],v=0;vtr",e(o)).each((function(t,i){var o={},r=e(i);o.Index=t;var n=[],a=0;e("th",r).each((function(t,i){var o,r,l,d,s=e(i),v={};for(v.Html=ko.observable(s.html()),v.OHtml=i.outerHTML,s.attr("align")&&(v.HAlign=s.attr("align")),s.attr("dir")&&(v.HDir=s.attr("dir")),v.RowSpan=(o=s.attr("rowSpan"))&&!isNaN(o)?parseInt(o):1,v.ColSpan=(r=s.attr("colSpan"))&&!isNaN(r)?parseInt(r):1,v.ColSpanTemp=ko.observable(v.ColSpan),l=a;l1?(++v).toString():""}return""},t._vm.ThTdNoHide=function(e,i,o){var r,n=t._vm,a=this.ColSeqs(),l=ko.utils.arrayFilter("Th"==i?e.Th():e.Td(),(function(e,t){var o=0;e.Seq=a[e.Index],e.ColSpan-1;for(var r=e.Index;r0})).sort((function(e,t){var i=e.Seq,o=t.Seq;return i==o?0:i<\/script>",m+="